package practice15;

import java.math.BigInteger;

public class Main {
    public static String solution(String binary1, String binary2) {
        // Please write your code here
        // Step 1: Convert binary strings to BigInteger
        BigInteger b1 = new BigInteger(binary1, 2);
        BigInteger b2 = new BigInteger(binary2, 2);

        // Step 2: Perform addition
        BigInteger sum = b1.add(b2);

        // Step 3: Convert the result to decimal string and return
        return sum.toString(10);
        //return "";
    }

    public static void main(String[] args) {
        // You can add more test cases here
        System.out.println(solution("101", "110").equals("11"));
        System.out.println(solution("111111", "10100").equals("83"));
        System.out.println(solution("111010101001001011", "100010101001").equals("242420"));
        System.out.println(solution("111010101001011", "10010101001").equals("31220"));
    }
}